perm filename DDERIV.TIM[TIM,LSP]11 blob
sn#747494 filedate 1984-03-19 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00011 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 SAIL
C00005 00003 ∂06-Jul-82 1724 ARPAVAX.fateman at Berkeley
C00007 00004 ∂16-Jul-82 0012 Mabry Tyson <Tyson at SRI-AI> DERIV, DDERIV, FDDERIV results
C00012 00005 LM-2
C00013 00006 DDERIV
C00014 00007 DDERIV
C00015 00008 NIL
C00016 00009 SCORE Dec 12, 1983
C00017 00010 InterLisp Vax 780
C00018 00011 PSL-20
C00020 ENDMK
C⊗;
; SAIL
(fasload dderiv)
(timit)
Timing performed on Friday 07/16/82 at 10:26:07.
Cpu Time = 3.285
Elapsed Time = 320.116665
Wholine Time = 45.9
GC Time = 19.913
Load Average Before = 3.65508044
Load Average After = 5.23962355
Average Load Average = 4.447352
NIL
Timing performed on Friday 07/16/82 at 10:43:01.
Cpu Time = 3.288
Elapsed Time = 202.766666
Wholine Time = 45.233333
GC Time = 19.452
Load Average Before = 1.68017912
Load Average After = 2.96003354
Average Load Average = 2.32010633
NIL
Timing performed on Friday 07/16/82 at 10:46:59.
Cpu Time = 3.282
Elapsed Time = 156.6
Wholine Time = 45.9166665
GC Time = 19.847
Load Average Before = 2.6731608
Load Average After = 2.91310465
Average Load Average = 2.79313272
NIL
;;; New SAIL
(timit)
Timing performed on Wednesday 10/12/83 at 22:21:02.
Cpu (- GC) Time = 2.826
Elapsed Time = 97.283334
Wholine Time = 38.616667
GC Time = 18.283
Load Average Before = 1.3037759
Load Average After = 1.98685336
Average Load Average = 1.64531463
NIL
Timing performed on Wednesday 10/12/83 at 22:23:13.
Cpu (- GC) Time = 2.826
Elapsed Time = 89.35
Wholine Time = 36.0333333
GC Time = 18.288
Load Average Before = 1.76626956
Load Average After = 2.08296072
Average Load Average = 1.92461514
NIL
∂06-Jul-82 1724 ARPAVAX.fateman at Berkeley
Date: 6 Jul 1982 17:02:05-PDT
From: ARPAVAX.fateman at Berkeley
To: rpg@su-ai
Cc: ARPAVAX.jkf@Berkeley
dderiv under the same conditions, 30.8 sec, 17.28 in GC.
[same conditions =
I just ran DERIV; Franz Lisp opus 38.20 on a vax 11/780 running with
a load average of between .5 and .8 (light). Recorded time 27 seconds
of which 16 were in garbage collection.
The only change to the file was to declare (localf der1 deriv).]
∂06-Jul-82 1740 ARPAVAX.fateman at Berkeley
Date: 6 Jul 1982 17:35:21-PDT
From: ARPAVAX.fateman at Berkeley
To: rpg@su-ai
Cc: ARPAVAX.jkf@Berkeley
jkf reminded me to do (sstatus translink on) to get faster times,
so with that, on a 780:
deriv = 25,2, 16.9 of which is GC
dderiv = 27.4, 17.6 of which is GC
fdderiv requires subrcall which we don't have exactly. I haven't
looked to see how funcall can work instead.
∂16-Jul-82 0012 Mabry Tyson <Tyson at SRI-AI> DERIV, DDERIV, FDDERIV results
Date: 16 Jul 1982 0003-PDT
From: Mabry Tyson <Tyson at SRI-AI>
Subject: DERIV, DDERIV, FDDERIV results
To: rpg at SU-AI
Results for DERIV, DDERIV, FDDERIV for UCILISP (UT's version).
All timings are on SRI-AI's 2060 with load average around 0.2.
Notes on coding of the programs:
UCILISP open codes MAPCAR if the function is specified by a
LAMBDA expression but does not if the function is a defined function.
Therefore, (MAPCAR 'FOO BAR) was translated into (MAPCAR (FUNCTION
(LAMBDA (X) (FOO X))) BAR) to keep in the spirit of the open coded
version sent out.
DDERIV and FDDERIV involve calling a function which is the value of
a local variable. In UCILISP this may be done by simply calling
(FOO ...) where FOO is the local variable rather than fooling with
FUNCALL or SUBRCALL. This format handles both cases. With (NOUUO
NIL), these function calls do not become direct jumps (because the
value may change next time).
There was a slight problem in having the compiler produce SUBR code
to be stored under a different property (DERIV). It could be done
but not conveniently. So I just compiled the code as SUBR's and
editted the LAP code to make it load onto the DERIV property.
DDERIV and FDDERIV were the version that had the (CONS 'TIMES A) in
the definition for TIMES.
The loop was a PROG which had 5 calls to DERIV and looped 1000 times.
The function that did this was compiled to minimize the overhead.
In order to compute the overhead, I had a similar loop that called
a dummy function that just returned its arguments. Its cost was
about 0.21 seconds for the (NOUUO T) case and about 0.04 seconds
for the (NOUUO NIL) case. I did NOT subtract these out in the following
results (but I feel they should be).
Each test run produced about 265000 conses and I had about 150000 free words.
I did a GC before each run to keep things as constant as possible.
Function (NOUUO T) (NOUUO NIL)
DERIV 14.879-0.875 (.213) 4.451-0.868 (.043)
DDERIV 16.250-0.856 (.198) 4.983-0.855 (.044)
FDDERIV 16.073-0.873 (.211) 4.857-0.871 (.028)
DDERIV* 18.171-1.742 (.212) 6.091-1.717 (.043)
The format of the times are
total-gc (dummy)
where total is the total CPU time (including GC), GC is the amount used for
garbage collection and dummy is the amount of time used by the dummy loop. I
believe the clock ticks about every 0.015 seconds which explains the
difference between the .028 and .044 dummy times (one less tick).
Explanation of results:
I believe the second and third to be slower because the property list of
the variable (whose value was the property name) had to be searched twice,
first for a function property and then for the value of the variable.
Then, for the DDERIV case, another property list had to be searched to
find the function definition.
The DDERIV* case is one in which a FUNCALL is used. In UCILISP this
results in an extra CONS and a call to APPLY* which then does everything
done above. As you can see, it is slower.
-------
;;;LM-2
;; 8. DDERIV
(DEFUN TEST-DDERIV ()
(TIMING "DDERIV" (RUN)))
;; Compiled: 25.4 seconds.
;;DDERIV
D3
Property 4 deep
Elapsed 33.308
GC 20.1
CPU 13.208
Property had of plist
Elapsed 33.0
GC 20.3
CPU 12.7
D3
1/25/84 with interrupts
CPU 17.7
GC 9.0
;;DDERIV
D2
Elapsed 100.0
SWAP .113
CPU 56.6
GC 43.6
PGFLT 54
DSKOPS 3
D1
1/25/84 with interrupts
Elapsed 92.8
CPU 33.3
GC 59.5
;;; NIL
DDERIV
Fix fixnum-only functions (probably negligible in this case).
(Fortuitously, NIL compilation of (mapcar 'foo ...) works the same as
(mapcar #'foo ...), even though technically it should not.)
Try 1:
cpu=34.06,elapsed=35.35,pagefaults=4733
Try 2:
cpu=34.1,elapsed=35.38,pagefaults=4698
Totally inline-coded carcdr (etc.). (Note the current mapcar uses
the "normal", i.e. error-checking, car/cdr/rplaca/rplacd. I have an
uninstalled "fix" for this somewhere or other.)
cpu=27.36,elapsed=29.08,pagefaults=4697
cpu=27.38,elapsed=28.81,pagefaults=4709
cpu=26.6,elapsed=29.0,pagefaults=4733
;;; SCORE Dec 12, 1983
not Block compiled
28.067 seconds
9.126 gc
;;; InterLisp Vax 780
DDERIV:
←(TIME (RUN]
260032 conses
38.272 seconds
NIL
;;; PSL-20
4:03:24 USER DDeriv Test, also same as FDDeriv.
4:03:24 USER "DDeriv Test, also same as FDDeriv."
4:03:24 USER
4:03:24 USER Timing performed on DEC-20
4:03:24 USER 11-Mar-84 04:03:25 .
4:03:24 USER *** Garbage collection starting
4:03:26 USER *** GC 3: time 865 ms, 28957 recovered, 253464 free
4:03:29 USER *** Garbage collection starting
4:03:31 USER *** GC 4: time 1302 ms, 253383 recovered, 253383 free
4:03:34 USER *** Garbage collection starting
4:03:36 USER *** GC 5: time 1404 ms, 253448 recovered, 253449 free
4:03:36 USER
4:03:36 USER Cpu (- GC) Time = 6.04 secs
4:03:36 USER Elapsed Time = 10.0 secs
4:03:36 USER Wholine Time = 0.0
4:03:36 USER GC Time = 2.706 secs
4:03:36 USER Load Average Before = 1.2
4:03:36 USER Load Average After = 1.2
4:03:36 USER Average Load Average = 1.2